Skip to content

feat(identity): implement X25519 keypair generation and file storage #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ethical-buddy
Copy link
Member

Implemented the Identity layer that handles Noise-compatible X25519 keypair generation, loading, and saving.

This layer is essential to:

Generate and persist local identity (Noise keypairs)

Retrieve the keypair during handshake sessions

Store/load identities for repeated secure communication

I added a temp. test in main.go to review and run use "kp, _ := identity.GenerateKeypair()
fmt.Printf("Public Key: %x\n", kp.PublicKey)
identity.SaveKeypair(kp, "mykey.json")

loaded, _ := identity.LoadKeypair("mykey.json")
fmt.Printf("Loaded Key: %x\n", loaded.PublicKey)

" as guide.

@ethical-buddy ethical-buddy requested a review from JumaOchi July 25, 2025 09:09
Copy link
Member

@JumaOchi JumaOchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good maybe look into default paths maybe might be helpfull to add a utility function for default keypair locations. Also Maybe some error handling i.e code currently ignores the error from GenerateKeypair(). Other than that looks solid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants